package com.wwp.tbshop.presenter;

import android.content.Context;

import com.wwp.tbshop.activity.CollectGoodsActivity;
import com.wwp.tbshop.model.bean.CollectListBean;

import retrofit2.Call;

/**
 * Created by Xiaokun on 2017/6/17.
 */

public class CollectListPresenter extends BasePresenter<CollectListBean> {

    private Context mContext;

    public CollectListPresenter(Context context) {
        this.mContext = context;
    }

    public void getCollectList(int page, String pageNum, String userid) {
        Call<CollectListBean> collectList = mApiService.getCollectList(page, pageNum, userid);
        collectList.enqueue(mCallback);
    }

    @Override
    protected void onServerBug(int code) {

    }

    @Override
    protected void onConnectError(String message) {

    }

    @Override
    protected void onSuccess(CollectListBean collectListBean) {
        ((CollectGoodsActivity) mContext).onSuccess(collectListBean);
    }
}
